package com.cornergj.model;

public class ThirdAuthorizeUser implements Entity {
	
	private static final long serialVersionUID = 1L;
	
	/** id */
	protected Integer id;
	
	/** access_token */
	protected String accessToken;
	
	/** 用户头像 */
	protected String avatarImg;
	
	/** Uid */
	protected String uid;
	
	/** 对应用户信息id */
	protected Integer userKey;
	
	/** 新浪用户名 */
	protected String username;
	
 	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getAccessToken() {
		return accessToken;
	}
	
	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}
	
	public String getAvatarImg() {
		return avatarImg;
	}
	
	public void setAvatarImg(String avatarImg) {
		this.avatarImg = avatarImg;
	}
	
	public String getUid() {
		return uid;
	}
	
	public void setUid(String uid) {
		this.uid = uid;
	}
	
	public Integer getUserKey() {
		return userKey;
	}
	
	public void setUserKey(Integer userKey) {
		this.userKey = userKey;
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
 	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("id = ").append(id).append(", ");
		builder.append("accessToken = ").append(accessToken).append(", ");
		builder.append("avatarImg = ").append(avatarImg).append(", ");
		builder.append("uid = ").append(uid).append(", ");
		builder.append("userKey = ").append(userKey).append(", ");
		builder.append("username = ").append(username);
		return builder.toString();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		ThirdAuthorizeUser other = (ThirdAuthorizeUser) obj;
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		return true;
	}

}